package com.liu.yupao;

import cn.hutool.core.lang.Pair;
import io.swagger.models.auth.In;

import java.util.*;
import java.util.stream.Collectors;

/**
* @author lqh
* @since 2025-10-25 13:40
*/

public class Match {
    public static void main (String[] args) {
        HashMap<Integer, Integer> hashMap = new HashMap<> ();
        hashMap.put (1,10);
        hashMap.put (2,12);
        hashMap.put (3,1);
        hashMap.put (4,9);
        ArrayList<Map.Entry<Integer, Integer>> mapList = new ArrayList<> (hashMap.entrySet ());
        //按照value长短排序
        List<Map.Entry<Integer, Integer>> collect = mapList.stream ()
                .sorted (Comparator.comparingInt (Map.Entry::getValue))
                .collect (Collectors.toList ());



    }
    }



